<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>jq1</title>
	</head>

	<body>
		<div id="main" class="wrap" name="ggwrapgg" style="background: red;">
			DIV
			<span class="inner" id="mspan">
				SPAN
				<em class="sub">EM</em>
			</span>
		</div>
		<div id="main1" class="wrap" name="wrap">
			DIV
			<span class="inner">
				SPAN
				<em class="sub">EM2</em>
			</span>
		</div>

	</body>
	<script src="myJquery.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var div1 = document.getElementById("main");
//		console.log(div1.getElementById("mspan"));
		console.log(main.getAttribute("name"))
		// $("div").click(function(){....})
	</script>

</html>